'use strict'

$(document).ready(function(){
    var formvalue="";
    var flag=1;
    var index=1;
    $.extend({
        deleteSelectedRow:function deleteSelectedRow(roeID)
        {
            $("#"+roeID).remove();
        }
    })
    $(".content").on("click",".test_delete_btn",function()
    {
        deleteSelectedRow("testA")
    })
    $(".content").on("click",".save_btn",function()
    {
        GetValue();
    })

    function GetValue(){
        var value="";
        $('.arable tr').each(function(i){
            $(this).children('td'.each(function(j){
                if(j==3){
                    return ;
                }
                value+=$(this).children().children().eq(1).val()+",";
            }))
        })
        value=value.substring(0,value.length-1);
        alert(value);
    }

    function insertNewRow(){
        var rowLength=$(".atable>tbody").children("tr").length;
        var rowId="row"+flag;
        var insertStr="<tr id="+rowId+">"
            +"<td style='width:20%'><div class='s_one inputs_item' type='input'><label for=''>td-1</label><input type='text' class='inpt ' name='idNo'/><div></td>"
            +"<td style='width:20%'><div class='s_one inputs_item' type='input'><label for=''>td-2</label><input type='text' class='inpt ' id='' name='idNo'/><div></td>"
            +"<td style='width:20%'><div class='s_one inputs_item' type='input'><label for=''>td-3</label><input type='text' class='inpt ' id='' name='idNo'/><div></td>"
    }
    
    console.log('dom元素加载好了');
})
